"use strict";
cc._RF.push(module, 'dc2855Y6HtOg5/RjRtaOCzg', 'ButtonStartGame');
// script/ButtonStartGame.js

"use strict";

cc.Class({
  "extends": cc.Component,
  properties: {
    //添加maskLayer属性
    maskLayer: {
      type: cc.Node,
      "default": null
    },
    //添加swooshingAudio属性
    swooshingAudio: {
      "default": null,
      url: cc.AudioClip
    }
  },
  // LIFE-CYCLE CALLBACKS:
  // onLoad () {},
  start: function start() {},
  startGame: function startGame() {
    //激活背景
    this.maskLayer.active = true; //都设置为0

    this.maskLayer.opacity = 0; //将背景的颜色切换为黑色

    this.maskLayer.color = cc.Color.BLACK;
    this.maskLayer.runAction(cc.sequence(cc.fadeIn(0.2), cc.callFunc(function () {
      console.log('切换场景');
      cc.director.loadScene('game');
    }))); //加载和切换场景

    cc.audioEngine.playEffect(this.swooshingAudio);
  } // update (dt) {},

});

cc._RF.pop();